﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/PopupDiv.master"
    AutoEventWireup="true" CodeBehind="Send.aspx.cs" Inherits="Jzy.Web.WorkFlow.Fore.Send" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
.style1
{
     padding-right:10px;
     text-align:right;
     width:80px;
}
.style2
{
	  padding-top:5px;padding-bottom:5px;
}
</style>
<script type="text/javascript">
    var arrNodes =[];
    function node_click(sender, hidSend, txtSend)
    {
        
        for (var i = 0; i < arrNodes.length; i++)
        {
            if (arrNodes[i].ID == sender.value)
            {
                document.getElementById(hidSend).value = arrNodes[i].User.IDs;
                document.getElementById(txtSend).value = arrNodes[i].User.Names;
                break;
            }
        }
    }

    function send_click(lstNodes,taskID, hidSend, txtSend)
    {
        var url = "SelectNodeUser.aspx?NodeID=" + document.getElementById(lstNodes).value;
        if (taskID != null)
        {
            url += "&TaskID=" + taskID;
        }
        for (var i = 0; i < arrNodes.length; i++)
        {
            if (arrNodes[i].ID == document.getElementById(lstNodes).value)
            {
                if (arrNodes[i].IsParallel)//如果可以并行提交则可多选
                {
                    url += "&SingleSelect=false";
                }
            }
        }
        showDialog(hidSend, txtSend, url);
    }

   

    function submit_click()
    {    

        var doc = top.document.getElementById('frameMain').contentWindow.document;
        doc.getElementById('<%=hidSendID %>').value =  $('#<%=hidSend.ClientID %>').val();
        doc.getElementById('<%= hidAddSignID %>').value = $('#<%= hidAddSign.ClientID %>').val().replace(/-/g, "");
        doc.getElementById('<%= hidPassRoundID %>').value = $('#<%= hidPassRound.ClientID %>').val().replace(/-/g, "");
        doc.getElementById('<%= hidNextNodeID %>').value = $('#<%= lstNode.ClientID %>').val();
        doc.getElementById('<%= btnTransferID %>').click();
        top.delDivFrm();
    
       
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="height: 229px;">
        <table style="width: 100%">
            <tr>
                <td class="style1">
                    下一节点：
                </td>
                <td class="style2">
                    <asp:Label ID="lblNode" runat="server" Text="Label" Visible="false"></asp:Label>
                    <asp:ListBox ID="lstNode" runat="server" Width="150px"></asp:ListBox></td>
            </tr>
            <tr>
                <td class="style1">处理人：</td>
                <td><asp:TextBox ID="txtSend" runat="server" Width="150px" CssClass="txt"></asp:TextBox>                    
                    <input id="btnSelSend" runat="server" type="button" value="选择" /><asp:RequiredFieldValidator 
                        ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSend" 
                        Display="None" ErrorMessage="请选择处理人"></asp:RequiredFieldValidator>
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                        ShowMessageBox="True" ShowSummary="False" />
&nbsp;<asp:HiddenField ID="hidSend" runat="server" />
                </td>
            </tr>
            <tr id="trAddSign" runat="server">
                <td class="style1">
                    <asp:HyperLink ID="HyperLink1" runat="server">加签：</asp:HyperLink>
                </td>
                <td>
                    <asp:TextBox ID="txtAddSign" runat="server" TextMode="MultiLine" Width="150px" CssClass="txt" Height="40px"></asp:TextBox>
                    <input id="btnSelAdd" runat="server" type="button" value="选择"/>
                    <asp:HiddenField ID="hidAddSign" runat="server" />
                </td>
            </tr>
            <tr id="trSelPass" runat="server">
                <td class="style1">
                    <asp:HyperLink ID="HyperLink2" runat="server">传阅：</asp:HyperLink>
                </td>
                <td>
                    <asp:TextBox ID="txtPassRound" runat="server" TextMode="MultiLine" Width="150px" CssClass="txt" Height="40px"></asp:TextBox>
                    <input id="btnSelPass" runat="server" type="button" value="选择" />
                    <asp:HiddenField ID="hidPassRound" runat="server" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <input id="btnSubmit" type="button" value="提交" onclick="submit_click()" />
</asp:Content>
